﻿#ifndef CHOOK_H
#define CHOOK_H

#include "cnoncopy.h"
#include <windows.h>
#include <functional>

namespace ss {


typedef std::function<void(void)> HOOK_CALLBACK_FUNC;

class CHook : public CNonCopy
{
public:
    static CHook& Instance();
    ~CHook();

    bool InstallHook(HOOK_CALLBACK_FUNC func);
    void UnInstallHook();

private:
    CHook();
    bool InstallLLKeyboardHook();
    bool InstallLLMouseHook();
};




LRESULT CALLBACK LowLevelKeyboardProc(int code, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK LowLevelMouseProc(int code, WPARAM wParam, LPARAM lParam);


}


#endif // CHOOK_H
